
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
graceful-logger
Advanced tools
A simple, slim, graceful logger for Nodejs
logger = require('../lib')
logger.info('Hello', 'World!')
logger.warn({a: 'a', b: 'b'})
logger.err(-> "This is a function")
logger.format('medium')
logger.info('Hello', 'World!')
logger.warn({a: 'a', b: 'b'})
logger.err(-> "This is a function")
# Other features
## Output multi lines
logger.info '''
This is a multi line message:
Hello everyone.
Have a nice day!
'''
## Output required package
logger.info require('path')
## Output empty message
logger.info()
## Define any colors
logger.format ':level.blue :msg.grey'
logger.info('hello world')
## Use the numeric placeholder
logger.format ':level :0.grey :1.blue'
logger.info('hello', 'world')
Console x 5,367 ops/sec ±2.96% (89 runs sampled) # console.log
Log x 5,556 ops/sec ±1.76% (93 runs sampled) # The tiny log module written by tj
Logger x 5,612 ops/sec ±0.95% (96 runs sampled) # This module
Fastest is Logger,Log,Console
.(color)
format, but it only works after the :(label)
expression, e.g. :level.green :msg.grey
:msg
flag now support numbers for express the message of the correct index, e.g. :1.green :2.grey
, and you will get an green 'hello' and a grey 'world' by using logger.info('hello', 'world')
. Remember, the index start from 0.color
and level
prefix by set the color
and level
property of each method.util.format
to format object/function/array etc, as the same of console.log
setStream
and getStream
to get/set
writable stream of each methoderror
as alias of err
, warning
as alias of warn
MIT
FAQs
A simple, slim, graceful logger for Nodejs
We found that graceful-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.